/*
 * ResponseConsultarSAT.cpp
 *
 * @author Bematech S.A.
 */

#include "bilbao/protocol/serial/response/ResponseConsultarSAT.h"

namespace bilbao
{
	namespace protocol
	{
		namespace serial
		{
			namespace response
			{
				//--------------------------------------------------------------------------------
				// Construtor e destrutor
				//--------------------------------------------------------------------------------
				ResponseConsultarSAT::ResponseConsultarSAT( E_SERIAL_RESPONSE_ID eeee,
						ASefazResponse::E_SEFAZ_RESPONSE_ID cod )
					: ASerialResponse( eeee, cod )
				{
					_parameters.resize( 4 );
					EEEE( _id );
					Cod( _code );
				}
				//--------------------------------------------------------------------------------
				ResponseConsultarSAT::~ResponseConsultarSAT( void )
				{
					// Do nothing
				}
				//--------------------------------------------------------------------------------
				void ResponseConsultarSAT::EEEE( E_SERIAL_RESPONSE_ID eeee )
				{
					setParameter( 0, EEEEtoString( eeee ) );
					setParameter( 1, getMessageSerialResponse( eeee ) );
				}
				//--------------------------------------------------------------------------------
				void ResponseConsultarSAT::Cod( ASefazResponse::E_SEFAZ_RESPONSE_ID cod )
				{
					setParameter( 2, ASefazResponse::CODtoString( cod ) );
					setParameter( 3, ASefazResponse::getMessageSefazResponse( cod ) );
				}
				//--------------------------------------------------------------------------------

			} // namespace response
		} // namespace serial
	} // namespace protocol
} // namespace bilbao
